import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import electron from 'vite-plugin-electron'
import { join } from "path"
import path from 'node:path'
import AutoImport from 'unplugin-auto-import/vite'

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [
        vue(),
        AutoImport({
          imports: [
            'vue',
            'vue-router',
            'pinia',
          ],
          dts: false,
        }),
        electron({
            // 主进程入口文件
            entry: ["src-electron/main.ts", "src-electron/preload.ts"],
        })
    ],
    resolve: {
      alias: {
        '@': path.resolve(__dirname, './src'),
      }
    }
    /*开发服务器选项*/
    // server: {
    //     // 端口
    //     port: 3000,
    // }
})